import org.apache.log4j.Loggerimport org.apache.log4j.PropertyConfiguratorimport org.springframework.context.support.ClassPathXmlApplicationContext

PropertyConfigurator.configure("config/properties/log4j.properties")

def ctx = new ClassPathXmlApplicationContext
	(		"config/spring-collectors/management.xml",		"config/spring-collectors/data-sources.xml",
		"config/spring-collectors/jdbc-collectors-mysql.xml",//		"config/spring-collectors/jdbc-collectors-pgsql.xml",		"config/spring-collectors/jmx-agents.xml",		"config/spring-collectors/jmx-collectors.xml",//		"config/spring-collectors/shell-collectors.xml",//		"config/spring-collectors/shells.xml",//		"config/spring-collectors/commandsets.xml",//		"config/spring-collectors/groovy.xml"
	)
ctx.registerShutdownHook()waitForEnterPressed()ctx.close()System.exit(0)private void waitForEnterPressed(){	Thread.sleep(5000L)	println "\nPress <Enter> to continue..."	System.in.read()}